<%@ page language="java" pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<!DOCTYPE html>
<html lang='zh'>
<head>
<meta charset='UTF-8'>
<title>查看所有用户</title>
</head>
<body>
	<h3 align="center">所有用户</h3>
	<table width='60%' align='center' border='1px' cellpadding='0'
		cellpadding='0'>
		<tr align="center">
			<td>编号</td>
			<td>用户姓名</td>
			<td>备注</td>
			<td>操作</td>
		</tr>
		<c:forEach var="user" items="${alluserpage.userList }"
			varStatus="userstatus">
			<tr align='center'>
				<td>${userstatus.count }</td>
				<td>${user.userName }</td>
				<td>${user.userDesc }</td>
				<td><a
					href='${pageContext.request.contextPath }/servlet/updateuserpageforservlet?id=${user.id}'>更新</a>&nbsp;&nbsp;&nbsp;&nbsp;<a
					href='${pageContext.request.contextPath }/servlet/deleteuserforservlet?id=${user.id}'>删除</a>&nbsp;&nbsp;&nbsp;&nbsp;
					<a
					href='${pageContext.request.contextPath }/servlet/updateuserflagforservlet?id=${user.id}&user_flag=${user.userFlag==1?0:1}'>
						${user.userFlag==1?'禁用':'启用'} </a></td>
			</tr>
		</c:forEach>
		<tr align='right'>
			<td colspan='4'>共${alluserpage.pageNum }页&nbsp;&nbsp;&nbsp;<a
				href='${pageContext.request.contextPath }/servlet/finduserpageforservlet?currentPage=1'>第一页</a>&nbsp;&nbsp;&nbsp;<a
				href='${pageContext.request.contextPath }/servlet/finduserpageforservlet?currentPage=${alluserpage.prePage}'>上一页</a>&nbsp;&nbsp;&nbsp;

				<c:forEach begin="1" end="${alluserpage.pageNum }" step="1"
					var="elelment01">
					<a
						href='${pageContext.request.contextPath }/servlet/finduserpageforservlet?currentPage=${elelment01}'>${elelment01}</a>&nbsp;&nbsp;&nbsp;
				</c:forEach> <a
				href='${pageContext.request.contextPath }/servlet/finduserpageforservlet?currentPage=${alluserpage.nextpage}'>下一页</a>&nbsp;&nbsp;&nbsp;<a
				href='${pageContext.request.contextPath }/servlet/finduserpageforservlet?currentPage=${alluserpage.pageNum }'>最后一页</a>&nbsp;&nbsp;&nbsp;
			</td>
		</tr>
	</table>
</body>
</html>